package sy.service;

import spring.annotation.Autowired;
import spring.annotation.Component;
import spring.beans.BeanNameAware;

@Component
public class UserService {

    @Autowired
    private OrderService orderService;

    private String myBeanName;

//    implements BeanNameAware 时的逻辑
//    @Override
//    public void setBeanName(String beanName) {
//        myBeanName = beanName;
//        System.out.println("我的beanName是："+ myBeanName);
//    }

    public void test() {
        System.out.println("我是userService");
        orderService.test();
    }
}
